{% extends "site_base.html" %}

{% load i18n %}
{% load bootstrap_tags %}
{% load ifsetting_tag %}
{% load account_tags %}

{% block head_title %}{% trans "Login" %}{% endblock %}

{% block body %}
    
    <h1>{% trans "Log In to OpenID" %}</h1>
    
    <form action="{% url openid-register %}" method="post">
        <fieldset>
            {% csrf_token %}
            {{ form|as_bootstrap }}
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">{% trans "Log in" %}</button>
            </div>
        </fieldset>
    </form>
    
    {% if request.user.is_authenticated %}
        <div><a href="{% url acct_logout %}?next={{ request.path }}">Log out</a></div>
    {% endif %}
    
    <p>{% blocktrans %}If you have any trouble logging in to your account, contact us at <a href="mailto:{{ CONTACT_EMAIL }}">{{ CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
{% endblock %}

{% block extra_body %}
<script>
    $("#id_openid_url").focus();
</script>
{% endblock %}